<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
   <script src="jquery-1.8.0.js" type="text/javascript"></script>
    <script type="text/javascript">
	   $(function(){
		     $('.third').replaceWith($('.first'));  //用.first去替换.third并覆盖第一个.first
		   })
	 
	</script>
</head>

<body>
<div class="container">
  <div class="inner first">Hello</div>
  <div class="inner second">And</div>
  <div class="inner third">Goodbye</div>
</div>
</body>
</html>
